package com.lx.model;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.IndexDirection;
import org.springframework.data.mongodb.core.index.Indexed;

import java.util.Date;
import java.util.List;

import lombok.Data;

/**
 * @author 段誉
 * @create 2019-06-26 13:17
 */
@Data
public class User {
  @Id
  private String id;

  @Indexed(unique = true, direction = IndexDirection.DESCENDING, dropDups = true)
  private String username;

  private String password;
  private String email;
  private Date lastPasswordResetDate;
  private List<String> roles;
}
